package com.wyd.wenyongdaAdmin.xo.admin.menu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wyd.wenyongdaAdmin.commons.cache.MyBatisRedisCache;
import com.wyd.wenyongdaAdmin.commons.model.admin.menu.dto.TreeMenuDTO;
import com.wyd.wenyongdaAdmin.commons.model.admin.menu.entity.MenuEntity;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

@CacheNamespace(implementation = MyBatisRedisCache.class,eviction = MyBatisRedisCache.class)
public interface MenuMapper extends BaseMapper<MenuEntity> {

    List<TreeMenuDTO> getChildrenMenuByRoleId(Long roleId);

    List<TreeMenuDTO> getParentMenuByParentIds(@Param("parentId") Set<Long> parentId);
}
